package day10zy.pilot;

public class Pilot {
    public void ceshi(Aircraft p) {
        if(p instanceof keji){
            System.out.println("可以乘坐"+((keji) p).getZuowei()+"名客人");
        }
        if(p instanceof zhandouji){
            System.out.println("还有"+((zhandouji) p).dantou+"枚导弹");
        }
    }
}
